package com.ceair.flight.refund.location.dt.enums;

/**
 * 
 * @author liuwei@usky.com.cn
 * @date 2016/11/08 10:37:00
 *
 */
public enum CardTypeEnum {
	
	CHD("0","CHD","小飞人"),
	STD("1","STD","普卡"),
	SIL("2","SIL","银卡"),
	GOL("3","GOL","金卡"),
	PLT("4","PLT","白金卡");
	
	private final String codeNo;
	
	private final String code;
	
	private final String codeDesc;
	
	private CardTypeEnum(String codeNo, String code, String codeDesc) {
		this.codeNo = codeNo;
		this.code = code;
		this.codeDesc = codeDesc;
	}
	
	/**
	 * 
	 * @param code
	 * @return
	 */
	public static CardTypeEnum getByCode(String code) {
		for (CardTypeEnum instance : values()) {
			if (instance.getCode().equalsIgnoreCase(code)) {
				return instance;
			}
		}
		return null;
	}
	
	public String getCodeNo() {
		return codeNo;
	}
	
	public String getCode() {
		return code;
	}
	
	public String getCodeDesc() {
		return codeDesc;
	}
	
}
